[PATCH] data: more precise prune pattern for tmpfiles
authorZygmunt Krynicki <zygmunt.krynicki@canonical.com>
Fri, 13 Feb 2026 14:38:01 +0000 (15:38 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Tue, 17 Mar 2026 21:17:14 +0000 (22:17 +0100)
This way the structure of private tmp directories is left intact, while the
(aging) content of such directories is allowed to be removed.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Gbp-Pq: Name data-more-precise-prune-pattern-for-tmpfiles.patch

data/systemd-tmpfiles/snapd.conf

index da8f1c38b7098d745f2f75f1f4eec4bf212942a7..98329e3d6ca7ab8dda07b62213707781bfdf9ff9 100644 (file)
@@ -1,7 +1,7 @@
 D! /tmp/snap-private-tmp 0700 root root -
 
-# make sure the snap's private tmp folders are 
-# not reaped by age if configured by the system (noble+)
-# this will still let the contents be reaped, just not the
-# folder itself
+# Allow removing content in the private tmp folders without affecting the
+# architectural structure of the folders themselves.
+X /tmp/snap-private-tmp
 X /tmp/snap-private-tmp/*/tmp
+x /tmp/snap-private-tmp/*/tmp/.snap